// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : MultiServerEngine | ServerFramework | AccountMap.cs
// //  Created : 2016 - 02 - 16 20:53
// //  Modified: 2016 - 02 - 20 12:32
// //  ********************************************************************************

using FluentNHibernate.Mapping;
using ServerFramework.Implementation.Database.Domain;

namespace ServerFramework.Implementation.Database.Mapping
{
    public class AccountMap : ClassMap<Account_T>
    {
        public AccountMap()
        {
            Schema("mseauth");
            Table("accounts");
            Id(x => x.Id).GeneratedBy.Identity().Column("Id");
            Map(x => x.Givenname).Column("GivenName");
            Map(x => x.Surname).Column("Surname");
            Map(x => x.Email).Column("Email").Not.Nullable();
            Map(x => x.Region).Column("Region").Not.Nullable();
            Map(x => x.Language).Column("Language");
            Map(x => x.Salt).Column("Salt");
            Map(x => x.Ip).Column("IP");
            Map(x => x.Loginfailures).Column("LoginFailures").Not.Nullable();
        }
    }
}
